﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QLabel>
#include "common_define.h"
#include "logmodel.h"
#include "common_define.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

protected:
    void resizeEvent(QResizeEvent *event);
public Q_SLOTS:
    void on_action_open();
    void on_cb_filelist_currentTextChanged(const QString &arg);
    void on_task_finish(TASK_STATUS,QString);
    void on_task_lineinfo(QVector<LogEntry>);

protected:
    void init_datas();
    void init_menus();
    void init_connects();

    void add_load_file_task(QString filename);
private slots:
    void on_pb_search_clicked();

private:
    Ui::MainWindow *ui;
    QLabel *m_lb_dir;

    LogModel *model;

};

#endif // MAINWINDOW_H
